package start.spring.basic.job.entity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;


/**
 * 线程运行记录对象 gg_thread_exec
 * 
 * @author xuyy
 * @date 2023-06-29
 */
@Data
@TableName("gg_thread_exec")
@ApiModel(value="gg_thread_exec表映射对象", description="")
public class GgThreadExec implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "逻辑主键")
    @TableField("id")
    private Long id;

    @ApiModelProperty(value = "批次号")
    @TableField("pch")
    private String pch;

    @ApiModelProperty(value = "线程名称")
    @TableField("threadname")
    private String threadname;

    @ApiModelProperty(value = "执行状态")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "开始时间")
    @TableField("kssj")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date kssj;

    @ApiModelProperty(value = "开始时间起")
    @TableField(exist=false)
    private String beginKssj;
    
    @ApiModelProperty(value = "开始时间止")
    @TableField(exist=false)
    private String endKssj;

    @ApiModelProperty(value = "结束时间")
    @TableField("jssj")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date jssj;

    @ApiModelProperty(value = "错误信息")
    @TableField("cwxx")
    private String cwxx;

    @ApiModelProperty(value = "线程TraceId")
    @TableField("threadid")
    private String threadid;
	
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("pch", getPch())
            .append("threadname", getThreadname())
            .append("status", getStatus())
            .append("kssj", getKssj())
            .append("jssj", getJssj())
            .append("cwxx", getCwxx())
            .append("threadid", getThreadid())
            .toString();
    }
}
